<div class="mainbody">
  <table border="0"  cellspacing="0" cellpadding="0" style="width:100%;">
    <tr>
      <td valign="top" style="width:150px;"><div class="tableborder">
        <div class="tableheader">站点管理</div>
        <div class="leftmenubody">
          <div class="leftmenuitem">&#8226; <a href="index.php?job=site&action=addsite">添加站点</a></div>
          <div class="leftmenuitem">&#8226; <a href="index.php?job=site&action=list">站点管理</a></div>
          <div class="leftmenuitem">&#8226; <a href="index.php?job=site&action=opmlimport">OPML导入</a></div>
        </div>
      </div></td>
      <td valign="top" style="width:20px;"></td>
      <td valign="top">
      <!--if:($action == 'opmlimport')-->
<div class="box">
<div class="alert">关于导入OPML数据</div>
<div class="alertmsg">本功能可以导入任何标准的 OPML 文件.
<br /><b>但需要注意以下几点:</b>
<br /><br />1. 只能导入到一个分类.
<br />2. 导入OPML数据不会覆盖已有数据,而是在数据库插入新记录.</div>
</div>
<!--/if-->
	  <table width="100%" align="center" border="0" cellspacing="0" cellpadding="0">
	  <tr><td class="rightmainbody"><table width="100%" align="center" border="0" cellspacing="0" cellpadding="0">
<!--if: (in_array($action, array('addsite', 'modsite')))-->
<form action="index.php?job=site" method="POST" name="form">
    <input type="hidden" name="action" value="do{$action}">
    <input type="hidden" name="sid" value="$site[siteid]">
    <tr class="tdbheader">
      <td colspan="2">添加站点</td>
    </tr>
    <tr class="tablecell">
      <td>状态:</td>
      <td><select name="state"><option value="1" selected>显示</option><option value="0">隐藏</option></select></td>
    </tr>
    <tr class="tablecell">
      <td>站点名称:</td>
      <td><input name="title" type="text" class="formfield" value="$site[site_title]" size="35" maxlength="100" id="title"></td>
    </tr>
    <tr class="tablecell">
      <td>站点地址:</td>
      <td><input name="url" type="text" class="formfield" value="$site[site_url]" size="50" maxlength="100"></td>
    </tr>
    <tr class="tablecell">
      <td>RSS地址:</td>
      <td><input name="rss_url" type="text" id="rss_url" value="$site[rss_url]" size="50" maxlength="100" /></td>
    </tr>
    <tr class="tablecell">
      <td>ICON地址:</td>
      <td><input name="icon" type="text" id="icon" value="$site[site_icon]" size="50" maxlength="100" /></td>
    </tr>
    <tr class="tablecell">
      <td>email:</td>
      <td><input name="email" type="text" id="email" value="$site[site_email]" size="50" maxlength="100" /></td>
    </tr>
    <tr class="tablecell">
      <td>入库数:</td>
      <td><input name="count" type="text" id="count" value="$site[site_count]" size="50" maxlength="100" /></td>
    </tr>
    <tr class="tablecell">
      <td>站点说明:</td>
      <td><textarea name="content" cols="35" class="formfield" id="content">$site[site_content]</textarea></td>
    </tr>
    <tr class="tablecell">
      <td>RSS分类:</td>
      <td>
      <select id="rss_cate" name="rss_cate"><!--for_option:$catecache cid $v $site[rss_cate]-->$v[cate_title]<!--/for_option--></select></td>
    </tr>
    
    <tr class="tablecell">
      <td colspan="2" align="center"><input type="submit" value="提交" class="formbutton"> <input type="reset" value="重置" class="formbutton"></td>
    </tr>
    </form>
<!--elseif:($action == 'list')-->
	<form action="index.php?job=site" method="POST" name="form">
    <input type="hidden" name="action" value="domoresite">
    <tr class="tdbheader">
      <td width="6%" nowrap>排序</td>
      <td width="10%">状态</td>
      <td width="20%">名称</td>
      <td width="10%">建立时间</td>
      <td width="15%">更新时间</td>
      <td width="15%">操作</td>
      <td width="2%" nowrap><input name="chkall" value="on" type="checkbox" onclick="checkall(this.form)"></td>
    </tr>
<!--for:$sitedb $key $site-->
    <tr class="tablecell">
      <td><input class="formfield" style="text-align:center;font-size:11px;" type="text" value="$site[displayorder]" name="displayorder[$site[siteid]]" size="1"></td>
      <td><select name="state[$site[siteid]]">$site[state]</select></td>
      <td><a href="$site[rss_url]"><img src="../images/admin/feed.png" alt="RSS地址" border="0" /></a> <a href="$site[site_url]">$site[site_title]</a><a href="$site[rss_url]"></a></td>
      <td>$site[addtime] </td>
      <td>$site[uptime]</td>
      <td><a href="index.php?job=site&amp;action=modsite&amp;sid=$site[siteid]"><img src="../images/admin/feed_add.png" alt="$lang[_LANG_0407]" border="0" class="img"/></a> <a href="index.php?job=site&amp;action=dofetch&amp;sid=$site[siteid]"><img src="../images/admin/feed_go.png" alt="$lang[_LANG_0405]" border="0" class="img"/></a> <a href="?action=doClear&amp;id=$site[siteid]" onclick="return confirm('确认清空除此站点所属的内容?');"><img src="../images/admin/feed_error.png" alt="$lang[_LANG_0408]" border="0" class="img"/></a> <a href="http://feedvalidator.org/check.cgi?url=$site[rss_url]"><img src="../images/admin/feed_link.png" alt="$lang[_LANG_0406]" border="0" class="img"/></a>[$site[feed_count]]</td>
      <td nowrap><input type="checkbox" name="delete[]" value="$site[siteid]"></td>
    </tr>
<!--/for-->
  <tr class="tablecell">
    <td colspan="9" nowrap="nowrap"><div class="records">记录:$tatol</div>
                  <div class="multipage">$multipage</div></td>
  </tr>
    <tr class="tablecell">
      <td colspan="7" align="center"><input type="submit" value="更新 / 删除(所选)" class="formbutton"></td>
    </tr>
    </form>
<!--elseif:($action == 'opmlimport')-->
<form action="index.php?job=site" enctype="multipart/form-data" method="POST" name="form">
    <tr class="tdbheader">
      <td colspan="2">导入RSS数据</td>
    </tr>
    <tr class="tablecell">
      <td valign="top">选择目标分类:</td>
      <td><select name="cid" id="cid">
<!--for_option:$catecache cid $v null-->$v[cate_title]<!--/for_option-->
        </select></td>
    </tr>
    <tr class="tablecell">
      <td valign="top">选择文章作者:</td>
      <td><select name="uid" id="uid">
          <option value="" selected>== 选择作者 ==</option>
<!--php:$i=0;-->
<!--for:$userdb $key $user-->
          <option value="$user[userid]">$user[username]</option>
<!--/for-->
        </select></td>
    </tr>
    <tr class="tablecell">
      <td>选择OPML文件</td>
      <td><input class="formfield" type="file" name="opmlfile"> 允许文件类型:xml</td>
    </tr>
    
    <tr class="tablecell">
      <td colspan="2" align="center">
        <input type="submit" value="确定" class="formbutton">
        <input type="hidden" name="action" value="importopml">
      </td>
    </tr>
</form>
<!--/if-->
    <tr>
      <td class="tablebottom" colspan="7"></td>
    </tr>
      </table></td>
    </tr>
  </table>
</td>
    </tr>
  </table>
</div>
<!--include:footer-->
